<template>
  <div>
    <headerc :title="title"></headerc>
    <div class="c-main">
      <div class="main-seting">
        <el-button type="primary" style="float:right;margin-right:20px;margin-bottom:20px;" @click="dialogVisible = true">添加</el-button>
        <div style="margin:20px">
          <el-table
            :data="tableData"
            border
            max-height="450px"
            style="width: 100%">
            <el-table-column
              prop="number"
              label="序号">
            </el-table-column>
            <el-table-column
              prop="month"
              label="月份">
            </el-table-column>
            <el-table-column
              prop="date"
              label="发现隐患日期"
              width="140">
            </el-table-column>
            <el-table-column
              prop="content"
              label="隐患内容及可能造成的危害"
              width="240">
            </el-table-column>
            <el-table-column
              prop="level"
              label="整改级别">
            </el-table-column>
            <el-table-column
              prop="situation"
              label="整改情况">
            </el-table-column>
            <el-table-column
              prop="score"
              label="得分情况">
            </el-table-column>
            <el-table-column
              prop="remarks"
              label="备注"
              width="130">
            </el-table-column>
          </el-table>
          
        </div>
        <el-pagination
          background
          layout="prev, pager, next"
          :total="1000"
          style="margin-left:25%;">
        </el-pagination>
      </div>
    </div>
    <el-dialog title="填报须知" :visible.sync="dialogVisible" width="50%">
      <div class="notice">
        <p>一、填报要求：</p>
        <p>1、隐患排查级别分为班组级、车间级、公司级。</p>
        <p>2、简要写明隐患内容和可能造成的危害。</p>
        <p>3、必须与班组自查或隐患记录本中填写发现一换的时间一致。</p>
        <p>4、必须经车间技术员审核，并提出整改意见，进行整改。</p>
        <p>二、积分标准</p>
        <p>
          1、员工发现隐患，班组自行整改的记0.5分/处。
        </p>
        <p>2、员工发现隐患，经车间技术员审核、协调整改后每条记1分。</p>
        <p>3、员工发现隐患，通过公司力量协调整改后每条记2分。</p>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button
          type="primary"
          @click="
            dialogVisible = false
            dialogVisible2 = true">
            确 定
          </el-button>
      </span>
    </el-dialog>
    <el-dialog title="添加" :visible.sync="dialogVisible2" width="50%">
      <el-form ref="form" :model="form" label-width="100px">
        <el-form-item label="月份:" required>
          <el-date-picker
            v-model="value1"
            type="datetime"
            placeholder="请选择日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="发现隐患时间:" required>
          <el-date-picker
            v-model="value1"
            type="datetime"
            placeholder="请选择日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="采纳情况:" required>
          <el-select v-model="formInline.choose" placeholder="请选择">
            <el-option label="已采纳" value="yes"></el-option>
            <el-option label="未采纳" value="no"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="隐患内容及可能造成的危害：" required>
          <el-input
            v-model="formInline.content"
            type="textarea"
            :rows="4"
            placeholder="请填写"
          ></el-input>
        </el-form-item>
        <el-form-item label="整改情况:" required>
          <el-select v-model="formInline.change" placeholder="请选择">
            <el-option label="已整改" value="yes"></el-option>
            <el-option label="未整改" value="no"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="得分情况:" required>
          <el-input v-model="formInline.score" placeholder="请填写"></el-input>
        </el-form-item>
        <el-form-item label="备注:">
          <el-input v-model="formInline.remarks" placeholder="请填写"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible2 = false">取 消</el-button>
        <el-button type="primary" @click="dialogVisible2 = false">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
import headerc from "@/components/header.vue";
export default {
  components: {
    headerc,
  },
  data(){
    return {
      title:"隐患排查情况",
      form:'',
      value1:'',
      formInline: {
        remarks: '',
        choose: '',
        change:'',
        content: '',
        level: '',
        score: '',
      },
      dialogVisible: false,
      dialogVisible2: false,

      tableData: [{
        number: '1',
        month: '一月',
        date: '2021.1.7',
        content: ' ',
        level: '车间级',
        situation: '已整改',
        score: '1.0',
        remarks: ' ',
      },
      {
        number: '1',
        month: '一月',
        date: '2021.1.7',
        content: ' ',
        level: '车间级',
        situation: '已整改',
        score: '1.0',
        remarks: ' ',
      },

      {
        number: '1',
        month: '一月',
        date: '2021.1.7',
        content: ' ',
        level: '车间级',
        situation: '已整改',
        score: '1.0',
        remarks: ' ',
      },
      {
        number: '1',
        month: '一月',
        date: '2021.1.7',
        content: ' ',
        level: '车间级',
        situation: '已整改',
        score: '1.0',
        remarks: ' ',
      },
      {
        number: '1',
        month: '一月',
        date: '2021.1.7',
        content: ' ',
        level: '车间级',
        situation: '已整改',
        score: '1.0',
        remarks: ' ',
      },
      {
        number: '1',
        month: '一月',
        date: '2021.1.7',
        content: ' ',
        level: '车间级',
        situation: '已整改',
        score: '1.0',
        remarks: ' ',
      },
      {
        number: '1',
        month: '一月',
        date: '2021.1.7',
        content: ' ',
        level: '车间级',
        situation: '已整改',
        score: '1.0',
        remarks: ' ',
      },
      {
        number: '1',
        month: '一月',
        date: '2021.1.7',
        content: ' ',
        level: '车间级',
        situation: '已整改',
        score: '1.0',
        remarks: ' ',
      },
      {
        number: '1',
        month: '一月',
        date: '2021.1.7',
        content: ' ',
        level: '车间级',
        situation: '已整改',
        score: '1.0',
        remarks: ' ',
      },
      
      {
        number: '1',
        month: '一月',
        date: '2021.1.7',
        content: ' ',
        level: '车间级',
        situation: '已整改',
        score: '1.0',
        remarks: ' ',
      }],

    };
  },
  methods:{
    
  },
};
</script>

<style lang="scss" scoped>
.c-main {
  margin-left: 35px;
  height: 700px;
  background: #fff;
  margin-right: 35px;
  position: relative;
  overflow: hidden;
  border: 1px #dcdee0 solid;
}
</style>